package com.damage.purchase_dept.service;

import com.damage.common.entity.PurchasePlan;
import com.damage.common.exception.IncorrectPriceException;
import com.damage.common.exception.IncorrectStateException;
import com.damage.common.exception.ObsoleteException;
import com.github.pagehelper.PageInfo;
import com.sun.istack.internal.Nullable;

public interface IPurchasePlanService {

    Integer newPurchasePlan(PurchasePlan purchasePlan) throws IncorrectPriceException,ObsoleteException;

    Integer setProcessInstanceId(Integer purchasePlanId, String processInstanceId);

    PageInfo<PurchasePlan> findByState(@Nullable Integer pageNum, Integer state);

    PurchasePlan findById(Integer purchasePlanId);

    PurchasePlan findDetailedPurchasePlanById(Integer purchasePlanId);

    Integer update(PurchasePlan purchasePlan) throws IncorrectPriceException;

    Integer deleteById(Integer purchasePlanId) throws IncorrectStateException;
}
